import type {
  Activity,
  Category,
  PageByActivity,
  QueryPageByActivity,
  Result,
} from '@/config/data/data'
import { get } from './request'


/**
 * 根据活动分类获取活动数据
 * @param data
 * @returns
 */
export const ReqSelectActivityByCategory = (
  data: QueryPageByActivity
): Promise<Result<PageByActivity>> => get('/activity/page/category', data)


/**
 * 根据活动状态获取活动数据
 * @param data
 * @returns
 */
export const ReqSelectActivityByState = (
  data: QueryPageByActivity
): Promise<Result<PageByActivity>> => get('/activity/page/state', data)

/**
 * 根据id查询活动内容详情
 * @param data id
 * @returns 单条活动详情内容
 */
export const ReqSelectActivityDetail = (data:{id:number}):Promise<Result<Activity>>=>get("/activity",data)
